package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import pojo.User;
import service.UserService;

@Controller
@RequestMapping("/user")

public class UserController {
    private UserService userService;
    @RequestMapping("/show")
    public String show(){
        return "index";

    }
    @RequestMapping("/login")
    public String login(User user) {
        boolean flag=userService.login(user);
        if(flag){
            return "index";
        }else return "login";
    }
}
